<template>
  <el-card class="page-container">
    <template #header>
      <div class="header">
        <span>首页</span>
        <span>
<!--          <el-button type="success" @click="back">返回前台</el-button>-->
        </span>
      </div>
    </template>
    <el-form label-position="left" label-width="auto" :model="userinfo">
      <el-form-item label="用户名">
        <el-input v-model="userinfo.username" disabled/>
      </el-form-item>
      <el-form-item label="昵称">
        <el-input v-model="userinfo.nickname" disabled/>
      </el-form-item>
      <el-form-item label="个性签名">
        <el-input
                  type="textarea"
                  v-model="userinfo.signature"
                  :rows="3"
                  :maxlength="150"
                  disabled
        />
      </el-form-item>
      <el-form-item label="邮箱">
        <el-input v-model="userinfo.email" disabled/>
      </el-form-item>
      <el-form-item label="创建时间">
        <el-input v-model="userinfo.createtime" disabled/>
      </el-form-item>
    </el-form>
  </el-card>

</template>

<script setup>
import {useRouter} from "vue-router"
import useUserInfoStore from "../../stores/userInfo.js";
import {ref} from "vue";

const router = useRouter()

const back = () => {

  router.push('/main')

}

const userInfoStore = useUserInfoStore()

const userinfo = ref({...userInfoStore.info})

</script>

<style scoped>
.page-container{
  min-height: 100%;
  box-sizing: border-box;
}
.header{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

</style>